| Fully Qualified Name: | CodeIgniter\Validation\FileRules |
File validation rules
| Name | Description | Defined By |
|---|---|---|
| __construct() | Constructor. | FileRules |
| ext_in() | Checks to see if an uploaded file's extension matches one in the parameter. | FileRules |
| is_image() | Uses the mime config file to determine if a file is considered an "image", which for our purposes basically means that it's a raster image or svg. | FileRules |
| max_dims() | Checks an uploaded file to verify that the dimensions are within a specified allowable dimension. | FileRules |
| max_size() | Verifies if the file's size in Kilobytes is no larger than the parameter. | FileRules |
| mime_in() | Checks to see if an uploaded file's mime type matches one in the parameter. | FileRules |
| uploaded() | Verifies that $name is the name of a valid uploaded file. | FileRules |
Constructor.
| Parameter Name | Type | Description |
|---|---|---|
| $request | \RequestInterface |
Returns:
Checks to see if an uploaded file's extension matches one in the parameter.
| Parameter Name | Type | Description |
|---|---|---|
| $blank | string|null | |
| $params | string |
Returns: bool
Uses the mime config file to determine if a file is considered an "image", which for our purposes basically means that it's a raster image or svg.
| Parameter Name | Type | Description |
|---|---|---|
| $blank | string|null | |
| $params | string |
Returns: bool
Checks an uploaded file to verify that the dimensions are within a specified allowable dimension.
| Parameter Name | Type | Description |
|---|---|---|
| $blank | string|null | |
| $params | string |
Returns: bool
Verifies if the file's size in Kilobytes is no larger than the parameter.
| Parameter Name | Type | Description |
|---|---|---|
| $blank | string|null | |
| $params | string |
Returns: bool
Checks to see if an uploaded file's mime type matches one in the parameter.
| Parameter Name | Type | Description |
|---|---|---|
| $blank | string|null | |
| $params | string |
Returns: bool
Verifies that $name is the name of a valid uploaded file.
| Parameter Name | Type | Description |
|---|---|---|
| $blank | string | |
| $name | string |
Returns: bool